@echo off
REM 协议格式 "corbaname:"<corbaloc>["#"<string_name>]
set /p choice=please input(1): 
set TAO="E:\_proj\_opendds\ACE_wrappers\TAO"


echo start tao_cosnaming
start "tao_cosnaming" cmd /c %TAO%\orbsvcs\Naming_Service\tao_cosnaming.exe -ORBListenEndpoints iiop://localhost:2809

timeout /t 1 >nul
echo start MessengerServer.exe
start "MessengerServer" cmd /c %TAO%\\orbsvcs\DevGuideExamples\NamingService\corbaname_Messenger\MessengerServer.exe -ORBInitRef NameService=corbaloc::localhost/NameService

timeout /t 2 >nul
echo start MessengerClient.exe

timeout /t 4 >nul
REM 方式1 corbaname:iiop:localhost:2809#example/Messenger
REM 方式2 告诉ORB 命名服务的位置 -ORBInitRef NameService=corbaloc::localhost:2809/NameService corbaname:rir:#example/Messenger

start "MessengerClient" cmd /k %TAO%\\orbsvcs\DevGuideExamples\NamingService\corbaname_Messenger\MessengerClient.exe -ORBInitRef NameService=corbaloc::localhost:2809/NameService corbaname:rir:#example/Messenger